package com.javaweb.common;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @desc:
 * @author: Ping
 * @date: 2023/9/20 10:55
 */

public class StringTools {

    public static Date toDate(String dateStr) {
        try {
            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            return sdf.parse(dateStr);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return null ;


    }

}
